/* 
 * File:   DisplayMonitor.h
 * Author: Martijn
 *
 * Created on 22 juni 2010, 16:43
 */

#ifndef _DISPLAYMONITOR_H
#define	_DISPLAYMONITOR_H


#include "pRTOS.h"
#include "LCDDisplay.h"
#include "clock.h"

#define ENABLED 1
#define WAITING 2
#define FLUSHING 3


struct DisplayItem {
   char buf[16];
   short row;
   short len;
};

class DisplayMonitor : public cTask {
public:
   // constructor
  DisplayMonitor();
  // : cTask (this, 3) { }

   // public operations
   void enable();
   void disable();
   void init();
   void update();
   void display(DisplayItem di);
   void clear();
private:      
	int state;
	int index;
    
   // private roles
   LCDDisplay theLCD;
   cChannel<DisplayItem,2> dmtChan;
   DisplayItem di;      
};


#endif	/* _DISPLAYMONITOR_H */

